package com.lantosec.hmrp.modules.report.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lantosec.hmrp.core.kit.PageVO;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

public interface ClinicalMedicationMapper extends BaseMapper<Map> {

    /**
     * 住院患者抗菌药使用率监控
     * @param startTime
     * @param endTime
     * @param deptName
     * @param dateState
     * @param deptState
     * @return
     */
    PageVO<Map<String,Object>> getAntimicrobialsInpatientsList(PageVO<Map<String,Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime,
                                                                       @Param("deptName") String deptName, @Param("dateState") Integer dateState, @Param("deptState") Integer deptState);

    /**
     * 门急诊患者抗菌药使用率监控
     * @param startTime
     * @param endTime
     * @param deptName
     * @param diagTreatType
     * @param dateState
     * @param deptState
     * @param diagTreatState
     * @return
     */
    PageVO<Map<String,Object>> getAntibioticsOutpatientsList(PageVO<Map<String,Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("deptName") String deptName,
                                                    @Param("diagTreatType") String diagTreatType, @Param("dateState") Integer dateState, @Param("deptState") Integer deptState,
                                                    @Param("diagTreatState") Integer diagTreatState);

    /**
     * 抗菌药使用情况监控
     * @param startTime
     * @param endTime
     * @param deptName
     * @param docName
     * @param diagTreatType
     * @param dateState
     * @param deptState
     * @param docNameState
     * @return
     */
    PageVO<Map<String,Object>> getAntimicrobialUseList(PageVO<Map<String,Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("deptName") String deptName,
                                                       @Param("docName") String docName, @Param("diagTreatType") String diagTreatType, @Param("dateState") Integer dateState,
                                                       @Param("deptState") Integer deptState, @Param("docNameState") Integer docNameState);

    /**
     * 抗菌药使用强度监控
     * @param startTime
     * @param endTime
     * @param deptName
     * @param dateState
     * @param deptState
     * @return
     */
    PageVO<Map<String,Object>> getStrengthAntimicrobialUseList(PageVO<Map<String,Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("deptName") String deptName,
                                                           @Param("dateState") Integer dateState, @Param("deptState") Integer deptState);

    /**
     * 抗菌药使用量排名
     * @param page
     * @param startTime
     * @param endTime
     * @param deptName
     * @param drugName
     * @param dateState
     * @param deptState
     * @param drugState
     * @return
     */
    PageVO<Map<String,Object>> getRankingAntimicrobialUseList(PageVO<Map<String,Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("deptName") String deptName,
                                                                    @Param("drugName") String drugName, @Param("dateState") Integer dateState, @Param("deptState") Integer deptState,
                                                                    @Param("drugState") Integer drugState);

    /**
     * 超限处方监控
     * @param page
     * @param startTime
     * @param endTime
     * @param deptName
     * @param docName
     * @param medRecordNo
     * @param clinicSpecFlag
     * @param prescriptCost
     * @return
     */
    PageVO<Map<String, Object>> getOverLimitPrescriptionList(PageVO<Map<String,Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("deptName") String deptName,
                                                                   @Param("docName") String docName, @Param("medRecordNo") String medRecordNo, @Param("clinicSpecFlag") Integer clinicSpecFlag,
                                                                   @Param("prescriptCost") String prescriptCost);

    /**
     * 超限处方明细
     * @param prescriptNoColl
     * @return
     */
    Map<String, Object> getOverPrescriptionDetail(String prescriptNoColl);

    /**
     * 药占比监控
     * @param page
     * @param startTime
     * @param endTime
     * @param deptName
     * @param docName
     * @param diagTreatType
     * @param dateState
     * @param deptState
     * @param docNameState
     * @param diagTreatState
     * @return
     */
    PageVO<Map<String, Object>> getReportDrugPctMonitorList(PageVO<Map<String, Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime,
                                                            @Param("deptName") String deptName, @Param("docName") String docName, @Param("diagTreatType") String diagTreatType,
                                                            @Param("dateState") Integer dateState, @Param("deptState") Integer deptState, @Param("docNameState") Integer docNameState,
                                                            @Param("diagTreatState") Integer diagTreatState);

    /**
     * 基本药物监控
     * @param page
     * @param startTime
     * @param endTime
     * @param deptName
     * @param diagTreatType
     * @param dateState
     * @param deptState
     * @param diagTreatState
     * @return
     */
    PageVO<Map<String, Object>> getReportBasicDrugMonitorList(PageVO<Map<String, Object>> page, @Param("startTime") String startTime, @Param("endTime") String endTime,
                                                              @Param("deptName") String deptName, @Param("diagTreatType") String diagTreatType, @Param("dateState") Integer dateState,
                                                              @Param("deptState") Integer deptState, @Param("diagTreatState") Integer diagTreatState);

}
